﻿/*
 * 
 * User: manju  Date: 6/25/2012
 * 
 */
using System;
using System.Collections;

namespace Examples
{

	public class Person
	{
		private string firstName;
		private string lastName;
		
		private Address billingAddress;
		private Address shippingAddress;
		
		private ArrayList creditCards;
		
		public Person()
		{
			creditCards = new ArrayList();
		}
		public string FirstName {
			get { return firstName; }
			set { firstName = value; }
		}

		public string LastName {
			get { return lastName; }
			set { lastName = value; }
		}

		public Address BillingAddress {
			get { return billingAddress; }
			set { billingAddress = value; }
		}

		public Address ShippingAddress {
			get { return shippingAddress; }
			set { shippingAddress = value; }
		}

		public ArrayList CreditCards {
			get { return creditCards; }
			set { creditCards = value; }
		}
		
		public void PrintDetails(){
			Console.WriteLine(FirstName + ", " + LastName);
			billingAddress.PrintDetails();
			shippingAddress.PrintDetails();
			foreach(CreditCard c in creditCards) c.PrintDetails();
		}
	}
}
